Merged
Conversation
…add the flag -Zjson-target-spec, I though I needed the flag --target but no
… add new -C flags for memory map and frame pointer
…inters only in dev and test
Improve config.toml
…by setting correctly the sp
Fix trap frame stack pointer and improve AlignedStack primitive
…ic API from kernel mem module to update the kernel sp
…ernel_sp-fn Refactor update_kernel_sp function
…r-test-number Refactor test suite creation to avoid specifying the number of test inside the suite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and refactorings to the kernel's memory and stack handling for the RISC-V32 architecture, updates configuration and build scripts, and removes some redundant fields from test files. The most significant changes focus on improving stack alignment, simplifying stack management, and enhancing build configuration for better debugging and reliability.
Memory and Stack Alignment Improvements:
Introduced a new
AlignedStack16struct (with 16-byte alignment) to replace the previousAlignedStack, improving stack alignment for both the scheduler and trap handling; updated all relevant usages and initializations to useAlignedStack16(src/primitives/stack.rs,src/arch/riscv32/scheduler/mod.rs,src/arch/riscv32/traps/trap_frame.rs) [1] [2] [3] [4] [5] [6] [7].Added a new
memmodule underarch::riscv32with a functionupdate_kernel_spto handle updating the kernel stack pointer in a more modular way (src/arch/riscv32/mem.rs,src/arch/riscv32/mod.rs, [1] [2] [3] [4].Build Configuration and Debugging Enhancements:
Updated
.cargo/config.tomlto setpanic = "abort"for all profiles, addedforce-frame-pointersfor improved backtraces, enabledprofile-rustflags, and simplified build/test/Clippy aliases to remove hardcoded target specifications (.cargo/config.toml) [1] [2] [3] [4] [5].Bumped kernel version to 0.4.2 in both
Cargo.tomlandsrc/info.rs[1] [2].Test Suite Refactoring:
tests_nbfield from all test suite definitions, as the number of tests can be inferred automatically, simplifying test maintenance [1] [2] [3] [4] [5] [6] [7] [8] [9] [10].Other Notable Changes:
These changes collectively improve the kernel's portability, reliability, and maintainability, particularly for RISC-V32 targets.